/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.ec.dto.groupinfo;

import java.io.Serializable;

/**
 * 群组成员流量限额设置请求体
 *
 * @author cmcc-iot-api
 * @date 20200117 15:32:50
 */
public class EcGroupMemberSetFlowReqDTO implements Serializable {

    private static final long serialVersionUID = -6852723313125536483L;

    private String msisdn;

    private String groupId;

    private String accountId;

    private String operType;

    private String offerId;

    private String apnName;

    private String limitValue;

    private String actionRule;

    public String getMsisdn() {
        return msisdn;
    }

    public void setMsisdn(String msisdn) {
        this.msisdn = msisdn;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    public String getOfferId() {
        return offerId;
    }

    public void setOfferId(String offerId) {
        this.offerId = offerId;
    }

    public String getApnName() {
        return apnName;
    }

    public void setApnName(String apnName) {
        this.apnName = apnName;
    }

    public String getLimitValue() {
        return limitValue;
    }

    public void setLimitValue(String limitValue) {
        this.limitValue = limitValue;
    }

    public String getActionRule() {
        return actionRule;
    }

    public void setActionRule(String actionRule) {
        this.actionRule = actionRule;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("物联卡号码:").append(msisdn).append(",");
        stringBuilder.append("群组ID:").append(groupId).append(",");
        stringBuilder.append("群组订购的资费商品ID:").append(offerId).append(",");
        stringBuilder.append("APN名称:").append(apnName).append(",");
        stringBuilder.append("限额值（单位 MB）:").append(limitValue).append(",");
        if (actionRule.equals("1")) {
            stringBuilder.append("限额规则（达到限额值，将执行的业务规则）:").append("停数据通信服务").append(",");
        } else if (actionRule.equals("2")) {
            stringBuilder.append("限额规则（达到限额值，将执行的业务规则）:").append("使用流量池外资费").append(",");
        }
        if (operType.equals("1")) {
            stringBuilder.append("限额设置:").append("添加");
        } else if (operType.equals("2")) {
            stringBuilder.append("限额设置:").append("删除");
        } else if (operType.equals("3")) {
            stringBuilder.append("限额设置:").append("变更");
        }
        return stringBuilder.toString();
    }
}
